package com.docmanage.am.domain;

import com.docmanage.common.annotation.Excel;
import com.docmanage.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 档案编码规则对象 am_code_serial
 * 
 * @author pointLion
 * @date 2023-06-18
 */
@Data
public class AmCodeSerial extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    private Long tenantId;

    /** 序号（从1开始） */
    @Excel(name = "序号", readConverterExp = "从=1开始")
    private Long serialNum;

    /** 编号前缀 */
    @Excel(name = "编号前缀")
    private String prefix;

    /** 是否包含日期 */
    @Excel(name = "是否包含日期")
    private String ifHaveDate;

    /** 长度 */
    @Excel(name = "长度")
    private Long codeLength;

    /** 最新日期（生成编码的最新日期） */
    @Excel(name = "最新日期", readConverterExp = "生=成编码的最新日期")
    private String codeDate;

    /** 分类id */
    @Excel(name = "分类id")
    private Long groupId;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("serialNum", getSerialNum())
            .append("prefix", getPrefix())
            .append("ifHaveDate", getIfHaveDate())
            .append("codeLength", getCodeLength())
            .append("codeDate", getCodeDate())
            .append("groupId", getGroupId())
            .toString();
    }
}
